home *** CD-ROM | disk | FTP | other *** search
- ===================================================================
- RCS file: RCS/cccp.c
- retrieving revision 1.1
- diff -c -r1.1 cccp.c
- *** 1.1 1995/04/24 18:18:51
- --- cccp.c 1995/08/01 20:20:32
- ***************
- *** 3,8 ****
- --- 3,12 ----
- Written by Paul Rubin, June 1986
- Adapted to ANSI C, Richard Stallman, Jan 1987
-
- + Modified by Andrew M. Bishop to provide better input to
- + C documentation program `cxref' April-August 1995.
- + All AMB hacks are indicated as such in the code.
- +
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- ***************
- *** 930,936 ****
- /* Here is the actual list of #-directives, most-often-used first. */
-
- static struct directive directive_table[] = {
- ! { 6, do_define, "define", T_DEFINE, 0, 1},
- { 2, do_if, "if", T_IF},
- { 5, do_xifdef, "ifdef", T_IFDEF},
- { 6, do_xifdef, "ifndef", T_IFNDEF},
- --- 934,940 ----
- /* Here is the actual list of #-directives, most-often-used first. */
-
- static struct directive directive_table[] = {
- ! { 6, do_define, "define", T_DEFINE, 0, 1, 1}, /* An AMB Hack , added ', 1' at end. */
- { 2, do_if, "if", T_IF},
- { 5, do_xifdef, "ifdef", T_IFDEF},
- { 6, do_xifdef, "ifndef", T_IFNDEF},
- ***************
- *** 3457,3463 ****
-
- /* Nonzero means we must copy the entire command
- to get rid of comments or backslash-newlines. */
- ! int copy_command = 0;
-
- U_CHAR *ident, *after_ident;
-
- --- 3461,3467 ----
-
- /* Nonzero means we must copy the entire command
- to get rid of comments or backslash-newlines. */
- ! int copy_command = 1; /* An AMB Hack , original was 0. */
-
- U_CHAR *ident, *after_ident;
-
- ***************
- *** 3634,3640 ****
- /* No need to copy the command because of a comment at the end;
- just don't include the comment in the directive. */
- if (bp == limit || *bp == '\n') {
- ! bp = obp;
- goto endloop1;
- }
- /* Don't remove the comments if -traditional. */
- --- 3638,3644 ----
- /* No need to copy the command because of a comment at the end;
- just don't include the comment in the directive. */
- if (bp == limit || *bp == '\n') {
- ! /* bp = obp; An AMB Hack, originalwas not commented out. */
- goto endloop1;
- }
- /* Don't remove the comments if -traditional. */
- ***************
- *** 4443,4449 ****
- pcfinclude (pcfbuf, pcfbuflimit, fname, op);
- }
- else
- ! finclude (f, fname, op, is_system_include (fname), searchptr);
-
- if (angle_brackets)
- system_include_depth--;
- --- 4447,4453 ----
- pcfinclude (pcfbuf, pcfbuflimit, fname, op);
- }
- else
- ! finclude (f, fname, op, angle_brackets , searchptr); /* An AMB Hack, orignal had is_system_include(fname) instead of angle_brackets. */
-
- if (angle_brackets)
- system_include_depth--;
- ***************
- *** 7667,7674 ****
- #else
- sprintf (line_cmd_buf, "# %d ", ip->lineno);
- #endif
- ! line_end = quote_string (line_cmd_buf + strlen (line_cmd_buf),
- ! ip->nominal_fname);
- if (file_change != same_file) {
- *line_end++ = ' ';
- *line_end++ = file_change == enter_file ? '1' : '2';
- --- 7671,7684 ----
- #else
- sprintf (line_cmd_buf, "# %d ", ip->lineno);
- #endif
- ! /* An AMB Hack START, all new code. */
- ! if(ip->dir && ip->dir->fname)
- ! line_end = quote_string (line_cmd_buf + strlen (line_cmd_buf),
- ! &ip->nominal_fname[strlen(ip->dir->fname)+1]);
- ! else
- ! /* An AMB Hack END */
- ! line_end = quote_string (line_cmd_buf + strlen (line_cmd_buf),
- ! ip->nominal_fname);
- if (file_change != same_file) {
- *line_end++ = ' ';
- *line_end++ = file_change == enter_file ? '1' : '2';
-